package org.opens.config;

import cn.hutool.extra.spring.SpringUtil;
import org.opens.util.SpringUtil2;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Import(value = {SpringUtil.class})
@Configuration
public class HuToolConfig implements ApplicationContextAware {

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        System.out.println("applicationContext::" + applicationContext);
        System.out.println(SpringUtil.getApplicationContext());
        System.out.println(SpringUtil2.getApplicationContext());
    }

}
